package org.springblade.modules.platform.dto;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.NullSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
public class RuleLinkageDTO {

    private Integer id;
    /**
     * 名称
     */
    @ApiModelProperty(value = "名称")
    private String ruleLinkageName;

    /**
     * 定时时间格式
     */
    @ApiModelProperty(value = "定时时间格式")
    private String cronExpression;



    /**
     * 定时时间格式
     */
    @ApiModelProperty(value = "定时查询时间格式")
    private String cronQueryExpression;
    /**
     * 设备ID
     */
    @ApiModelProperty(value = "控制箱")
    private String deviceId;


    @ApiModelProperty(value = "真空泵数量")
    private Integer deviceNumber;

    /**
     * 设备名称
     */
    @ApiModelProperty(value = "设备名称")
    private String deviceName;

    /**
     * 气压值
     */
    @ApiModelProperty(value = "气压值")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private Integer pressure;

    @ApiModelProperty(value = "范围")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private Integer pressureScope;


    @ApiModelProperty(value = "测量链集合")
    private List<RuleLinkageMeasuringDTO> ruleLinkageMeasuringDTOS;

    @NoArgsConstructor
    @Data
    public static class RuleLinkageMeasuringDTO {

        /**
         * 设备ID
         */
        @ApiModelProperty(value = "测量链编号")
        private String measuringId;;

        /**
         * 设备名称
         */
        @ApiModelProperty(value = "测量链名称")
        private String measuringName;;
    }




}
